package org.socialresume.client.mvp.view.widget;

import org.socialresume.client.model.Feed;
import org.socialresume.client.model.FeedItem;

import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

public class UpdateWidget extends Composite {
	public static final DateTimeFormat dateFormat = DateTimeFormat.getFormat("dd/MM/yyy HH:mm:ss");
	
	protected FeedItem item;
	protected Feed feed;
	
	public UpdateWidget(Feed feed, FeedItem item){
		this.feed = feed;
		this.item = item;
		SimplePanel panel = new SimplePanel();
		panel.setStyleName("updateBox");
		panel.setWidget(createFeedRepresentation());
		initWidget(panel);
	}

	protected Widget createFeedRepresentation() {
		VerticalPanel panel = new VerticalPanel();
		panel.add(new Label(item.getContent()));
		return panel;
	}
}
